<template>
  <div>
    <el-breadcrumb separator="|">
      <el-breadcrumb-item v-for="item in BreadcrumbRoute" :key="item.path">
        <a :href="item.path">{{ item.meta.title }}</a>
      </el-breadcrumb-item>
    </el-breadcrumb>
  </div>
</template>

<script>
export default {
  name: "Breadcrumb",
  mounted() {
    this.getBreadcrumbRoute();
  },
  data() {
    return {
      BreadcrumbRoute: [],
    };
  },
  methods: {
    getBreadcrumbRoute() {
      let matched = this.$route.matched
      this.BreadcrumbRoute = matched;
    },
  },
};
</script>

<style scoped>
div {
  margin-bottom: 20px;
}
</style>